#pragma once

#include "ugctrl.h"
// CTotalGrid
class CSymbolInfo;
class CAccountInfo;
class COrderManager;
class CPositionInfo;
class CTotalGrid : public CUGCtrl
{
	DECLARE_DYNAMIC(CTotalGrid)

public:
	void QuickRedrawCell(int col, long row);
	CTotalGrid();
	virtual ~CTotalGrid();

	virtual void OnSetup();

	int m_RowHeight;
	int m_ColWidth;
	int m_CenterColWidth;
	//int centerCol;

	int m_CenterCol;
	int m_BuyStopCol;
	int m_BuyOrderCol;
	int m_BuyQtyCol;
	int m_BuyCntCol;
	int m_SellOrderCol;
	int m_SellQtyCol;
	int m_SellCntCol;
	int m_SellStopCol;
	int m_LayoutIndex;

	int SetColDefine(int a_LayoutIndex);
	void SetCellProp();


	int m_MaxRows;
	int m_MaxCol;
	void SetUnfilledOrderInfo(CPositionInfo* a_CurPosi);
	void SetOrderInfo(CAccountInfo* a_Acc);
	void SetSymbolInfo(CSymbolInfo* a_SymInfo);
	void SetOrderInfo(COrderManager* a_OrderMgr);
	void SetOrderInfo(COrderManager* a_OrderMgr, CString a_AccountCode, CString a_SymbolCode);
	//void SetOrderRowHeight(int a_RowHeight, int a_ColWidth);
	//void ResizeWidths(int a_CenterWidth, int a_ColWidth);
	void ResetColWidth(int a_LayoutIndex, int a_ColWidth);
protected:
	DECLARE_MESSAGE_MAP()
};


